home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / tcp_ip / jnos / cmdshelp / dialer < prev    next >
Text File  |  1994-08-22  |  5KB  |  165 lines

  1.  
  2. dialer
  3.  
  4.         dialer <interface> [<dialer_file> [<seconds> [<pings> [<host>]]]]
  5.  
  6.         Set up an autodialer session for the interface.  Whenever the
  7.         interface is idle for the interval in <seconds>, the autodialer
  8.         will ping the <hostid>.  If there is no answer after <pings>
  9.         attempts, the autodialer will execute the special commands
  10.         contained in the <dialer_file>.
  11.  
  12.         If no <dialer_file> is specified, a previous dialer command
  13.         process will be removed.  If the number of <pings> is omitted, the
  14.         <dialer_file> will be executed without first pinging the <host>.
  15.  
  16.         The file may have any valid name, and must be located in the NOS
  17.         root directory.  The dialer commands in the file are the
  18.         following:
  19.  
  20.         >> Examples:  dialer sl0 ns9tel.dia 30 10 ns9tel
  21.  
  22.  
  23. DIALER FILE COMMANDS
  24.  
  25.         control down|up
  26.  
  27.         Control the 'asy' interface.  The 'down' option drops DTR and
  28.         RTS.  The 'up' option asserts DTR and RTS.
  29.  
  30.         >>  Example:  control down
  31.  
  32.  
  33.  
  34.         send "<string>" [<milliseconds>]
  35.  
  36.         This dialer command will write the specified string to the
  37.         interface. The string quote marks are required, and the string
  38.         may not contain embedded control characters.  However, the
  39.         standard C string escape sequences are recognized (but \0 should
  40.         not be used).  If <milliseconds> is specified, the <string>
  41.         characters are sent with a <milliseconds> inter-character delay,
  42.         useful for ancient Micom switches!
  43.  
  44.         >> Example:  send "atdt555-1212"
  45.  
  46.  
  47.  
  48.         speed [ 115200|57600|38400|19200|9600|4800|2400|1200|300 ]
  49.  
  50.         This command sets the speed of the interface to one of the
  51.         available speeds.  If the speed is missing, the speed will be
  52.         displayed in the dialer session window.
  53.  
  54.         >> Example:  speed 1200
  55.  
  56.  
  57.  
  58.         wait <milliseconds> [ "test_string" ] [<speed>]
  59.  
  60.         If only the time is specified, the dialer pauses for the desired
  61.         number of milliseconds.  Otherwise, the dialer reads until the
  62.         <test_string> is detected on the interface.
  63.  
  64.         If the string is not detected within the desired time, the
  65.         autodialer will reset.  The string quote marks are required, and
  66.         the string may not contain embedded control characters. However,
  67.         the standard C string escape sequences are recognized (but \0
  68.         should not be used).
  69.  
  70.         If the <speed> parameter is specified, the dialer will continue
  71.         to read characters until a non-digit is detected.  The string
  72.         read is converted to an integer, and used to set the interface
  73.         speed.  If the trailing non-digit is not detected within the
  74.         desired time, or the integer value is not a valid speed, the
  75.         autodialer will reset.
  76.  
  77.         >> Example:  wait 45000 "CONNECT" 1200
  78.  
  79.  
  80. DIALER FILE EXTENDED COMMANDS
  81.  
  82.  
  83.         failmode  [ on | OFF ]
  84.  
  85.         'failmode' establishes whether the dialer should continue after
  86.         a failed dialer command.  <off> implies abort the dialing script,
  87.         while <on> means continue the script, which in effect enables
  88.         the 'ifok' and 'iffail' commands.
  89.  
  90.  
  91.         begin
  92.  
  93.         'begin' starts a block of commands.
  94.  
  95.  
  96.         end
  97.  
  98.         'end' terminates a block of commands, which extends to the
  99.         previous unpaired 'begin'.
  100.  
  101.  
  102.         exit [<return_code>]
  103.  
  104.         'exit' ends the dialer script, with the result code set to that
  105.         of the previous dialer command unless <return_code> is specified.
  106.  
  107.  
  108.         status  [ up | down ]
  109.  
  110.         'status' is similar to the 'control' command, except that the
  111.         iostatus() routine is notified.
  112.  
  113.  
  114.         ifok <cmd>
  115.  
  116.         'ifok' invokes the dialer command <cmd> if the previous command
  117.         was successful.
  118.  
  119.  
  120.         iffail <cmd>
  121.  
  122.         'iffail' invokes the dialer command <cmd> if the previous command
  123.         was not successful.
  124.  
  125.  
  126. DIALER EXAMPLE FILE
  127.  
  128. The following dialer script will perform these steps:
  129. . drop DTR & RTS to force a hangup
  130. . wait 2 seconds and then raise DTR & CTS
  131. . set the port speed to 9600 baud and initialize the modem
  132. . dial a number and wait for the modem to return a CONNECT message
  133. . (abort if the dial-out was unsuccessful)
  134. . turn on continue-after-error mode
  135. . try three times to send a CR and obtain a Login: prompt
  136. . send my login name, password, wait 5 seconds and then exit
  137.  
  138. control down
  139. wait 2000
  140. control up
  141. speed 9600
  142. send "atz\ratm0l0e0\r"
  143. wait 1000
  144. send "atdt555-1212\r"
  145. wait 45000 "CONNECT"
  146. wait 2000
  147. failmode on
  148. send "\r"
  149. wait 5000 "ogin"
  150. iffail begin
  151.  send "\r"
  152.  wait 5000 "ogin"
  153.  iffail begin
  154.   send "\r"
  155.   wait 5000 "ogin"
  156.  end
  157. end
  158. wait 1000
  159. send "myname\r"
  160. wait 5000 "assword"
  161. wait 1000
  162. send "mypassword\r"
  163. wait 5000
  164. exit
  165.